package com.ruoyi.student.mapper;


import com.ruoyi.student.domain.CompetitionStudent;
import com.ruoyi.student.domain.VO.CompetitionStudentVO;

import java.util.List;
import java.util.Map;


/**
 * 报名赛事Mapper接口
 * 
 * @author ruoyi
 * @date 2023-11-15
 */
public interface CompetitionStudentMapper 
{
    /**
     * 查询报名赛事
     * 
     * @param certno 报名赛事主键
     * @return 报名赛事
     */
    public CompetitionStudent selectCompetitionStudentByCertno(String certno);

    /**
     * 查询报名赛事列表
     * 
     * @param competitionStudent 报名赛事
     * @return 报名赛事集合
     */
    public List<CompetitionStudent> selectCompetitionStudentList(CompetitionStudent competitionStudent);

    /**
     * 新增报名赛事
     * 
     * @param competitionStudent 报名赛事
     * @return 结果
     */
    public int insertCompetitionStudent(CompetitionStudentVO competitionStudent);

    /**
     * 修改报名赛事
     * 
     * @param competitionStudent 报名赛事
     * @return 结果
     */
    public int updateCompetitionStudent(CompetitionStudent competitionStudent);
    public int updateCompetitionStudentReview(CompetitionStudent competitionStudent);

    /**
     * 删除报名赛事
     * 
     * @param certno 报名赛事主键
     * @return 结果
     */
    public int deleteCompetitionStudentByCertno(String certno);

    /**
     * 批量删除报名赛事
     * 
     * @param certnos 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCompetitionStudentByCertnos(String[] certnos);

    /**
     * 加载赛事列表
     * * 含参/不含参
     * @return
     */
    public List<Map> loadCompetition();
    public List<Map> loadCompetitionQuestion();
    public String loadCompetitionById(String id);
    public String loadCompetitionByName(String name);

    /**
     * 将审核通过的考生添加到exam表中
     * @param map
     */
    void insertCompetitionExam(Map map);
    //添加前查询数据是否重复
    int getNumbersByCerno(String certno);


    /**
     * 通过赛事名称获取所有报名人的身份证号码
     * @param competitionId
     * @return
     */
    List getCernoByCompetitionId(String competitionId);


}
